home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // $RCSfile: polySelConstraintPanel.mel $
- //
- // $Source: /vobs/aw/Maya/src/PolyUISlice/UI/scripts/polySelConstraintPanel.mel $
- //
- // $Author: lmiller $
- // $Revision: /main/5 $
- // $Date: 2000/02/23 11:44:12 $
- //
- // Script: polySelConstraintPanel.mel
- //
- //
- //
- // SYNOPSIS
- // Creates the mel components around the polySelConstraintEditor
- //
- //AUTHOR Marianne Devaux - March, 1997
- //
-
- global proc polySelectionConstraintPanel(string $panelName)
- {
- global string $gMainPane;
- if (!`scriptedPanelType -exists polySelectionConstraintPanel`) {
- scriptedPanelType
- -unique true
- // -createCallback "createPolySelConstraintWindow"
- // -deleteCallback "deletePolySelConstraintWindow"
- -addCallback "addPolySelConstraintWindow"
- -removeCallback "removePolySelConstraintWindow"
- polySelectionConstraintPanel;
-
- setParent $gMainPane;
- scriptedPanel -unParent -type "polySelectionConstraintPanel"
- $panelName;
- }
- }
-
- //global proc createPolySelConstraintWindow(string $whichPanel)
- //{
- //}
-
- //global proc deletePolySelConstraintWindow(string $whichPanel)
- //{
- //}
-
- global proc buildPolyConstraintContextHelpItems(string $nameRoot, string $menuParent)
- //
- // Description:
- // Build context sensitive menu items
- //
- // Input Arguments:
- // $nameRoot - name to use as the root of all item names
- // $menuParent - the name of the parent of this menu
- //
- // Return Value:
- // None
- //
- {
- menuItem -label "Help on Selection Constraints..."
- -enableCommandRepeat false
- -command "showHelp SelectionConstraints";
- }
-
- global proc addPolySelConstraintWindow(string $whichPanel)
- {
- int $menusOkayInPanels = `optionVar -q allowMenusInPanels`;
- panel -e -mbv $menusOkayInPanels $whichPanel;
-
- // Build Menubar.
- menu -l "Reset"
- ($whichPanel+"resetMenu");
- menuItem -l "Disable All"
- -c ("resetPolySelectConstraint; polygonConstraintUpdate(\"" + $whichPanel + "\");")
- ($whichPanel+"resetMenuDisable");
-
- // Add support for the Context Sensitive Help Menu.
- //
- addContextHelpProc $whichPanel "buildPolyConstraintContextHelpItems";
-
- // create Monitor
- polySelectConstraintMonitor -create;
- // fill panel
- polygonConstraint($whichPanel);
- }
-
- global proc removePolySelConstraintWindow(string $whichPanel)
- {
- // delete Monitor
- polySelectConstraintMonitor -delete;
- }
-